<ul class="fly-list">  
    {volist name="list" id="vo"}                              
    <li>  <a href="#" class="fly-avatar">    <img src="https://g-search2.alicdn.com/img/bao/uploaded/i4/i1/TB10vaJKVXXXXaKXFXXXXXXXXXX_!!0-item_pic.jpg_250x250.jpg_.webp" alt="">  </a>  
        <h2><a class="layui-badge">{$vo.category}</a>        <a href="#" data-pn="{$vo.no}" class="btn-edit-item">
            {$vo.name}{neq name="$vo.model" value=""}[{$vo.model}]{/neq}</a>  </h2>  
        <div class="fly-list-info"><cite>参考价:{$vo.price}</cite><span>位置：{$vo.cno}{$vo.boxno}{$vo.bagno}</span>        
            <span class="fly-list-kiss" title=""><i class="iconfont icon-kiss"></i>在手数量:{$vo.num}</span>        <span class="fly-list-nums">       

                    <div class="layui-btn-group">
                            <button class="layui-btn layui-btn-mini">
                              领料
                            </button>
                            <button class="layui-btn layui-btn-mini layui-btn-normal">
                             更新存量
                                  </button>
                            <button data-pn="{$vo.no}" class="layui-btn layui-btn-mini layui-btn-warm btn-print-label">
                            打印标签
                            </button>
                          </div>

            </span>  
            </div>  <div class="fly-list-badge">          </div>
            
    </li>   
    {/volist}                                      
</ul>
<script>
$(function(){
    //重新绑定事件
    $('.btn-print-label').on('click',function(e){
        var pn = $(e.target).attr("data-pn");
        layer.open({
        type: 2 //此处以iframe举例
        ,title: '编辑打印数据'
        ,area: ['500px', '500px']
        ,shade: 0
        ,maxmin: true
        ,content: '/Warehouse/Label/edit/pn/'+pn+'.html'
        });
    })
    //重新绑定事件
    $('.btn-edit-item').on('click',function(e){
        var pn = $(e.target).attr("data-pn");
        layer.open({
        type: 2 //此处以iframe举例
        ,title: '编辑物料数据'
        ,area: ['500px', '500px']
        ,shade: 0
        ,maxmin: true
        ,content: '/Warehouse/Item/edit/pn/'+pn+'.html'
        });
    })
})
</script>